package com.eduction.service.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.eduction.modules.system.dao.SurveyProblemRepository;
import com.eduction.modules.system.entity.SurveyProblem;
import com.eduction.service.SurveyProblemService;

@Service
public class SurveyProblemServiceImpl implements SurveyProblemService{

	@Autowired
	private SurveyProblemRepository surveyProblemRepository;
	
	@Override
	public void saveSurveyProblem(SurveyProblem s) {
		surveyProblemRepository.saveSurveyProblem(s);
		
	}

	@Override
	public SurveyProblem querySurveyProblemData(String expertId, String itemId, String schoolId,String expertTypeId) throws SQLException {
		SurveyProblem s = surveyProblemRepository.querySurveyProblemData(expertId, itemId, schoolId,expertTypeId);
		return s;
	}

	@Override
	public List<SurveyProblem> querySurveyProblemData(String itemId, String schoolId, String expertTypeId) throws SQLException {
		List<SurveyProblem> surveyProblemList= surveyProblemRepository.querySurveyProblemData(itemId, schoolId,expertTypeId);
		return surveyProblemList;
	}

	@Override
	public void  deleteSurveyProblem(String expertId, String schoolId, String itemId,String expertTypeId) throws SQLException {
		surveyProblemRepository.deleteSurveyProblem(expertId,schoolId, itemId,expertTypeId);
	}



}
